using System.Collections.Generic;
using UnityEngine;

namespace Gameplay.PVE.Config
{
    public class RpgLevelMonsterConfig
    {
        public int lv_id;
        public int model_id;
        public int battle_model_res;
        public float attribute_ratio;
        public List<int> level_id_count;
        public List<int> monster_level;
        public List<float> monster_time;
        public List<int> monster_place;
        public List<int> parent;
        public List<Vector3Int> monster_skill_priority;
        public List<int> monster_wave;
        public int boss_warning;

        public T GetValueFromArray<T>(List<T> array,int index)
        {
            if (array == null)
            {
                return default;
            }
            if (array.Count > index)
            {
                return array[index];
            }
            else if (array.Count > 0)
            {
                return array[array.Count - 1];
            }
            else
            {
                return default;
            }
        }
    }
}